package mobile;

import flca.mda.codegen.data.ITemplate;
import flca.mda.codegen.data.Template;
import flca.mda.codegen.data.TemplateMergeStrategy;

public enum TidMobile {

	MOB_MAIN_HTML,
	MOB_MAIN_CSS,
	MOB_OVERLAY_CSS,
	MOB_OVERLAY_HTML,
	MOB_TEXT_HTML,
	MOB_MIXED_CSS,
	MOB_MIXED_HTML,
	MOB_LIST_HTML,
	MOB_GALLERY_HTML,
	MOB_TIMESLOTS_HTML,
	MOB_TIMESLOTS_CSS;
	
	
	// --- generate the templates
	public static ITemplate makeTemplate(TidMobile aTid)
	{
		String jetfile = MobileConstants.getJetFile(aTid);
		String targetdir = MobileConstants.getTargetDir(aTid);
		String classname = MobileConstants.getClassname(aTid);
		String pck = MobileConstants.getPackage(aTid);
		String ext = MobileConstants.getFileExt(aTid);
		String genFqn = MobileConstants.getGeneratorFqn(aTid);
		Class<?> appliesto[] = MobileConstants.getAppliesTo(aTid);
		TemplateMergeStrategy strategy = MobileConstants.getMergeStrategy(aTid);
		int rank = MobileConstants.getRank(aTid); 
		
		return new Template(aTid.name(), jetfile, genFqn, targetdir, pck, classname, ext, null, 
				appliesto, strategy, rank, MobileConstants.CARTRIDGE_NAME );
	}
}
